package com.demo.forum.services;

import com.demo.forum.model.Article;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IArticleService {
    @Transactional
    void create(Article article);
    List<Article> selectAll();
    List<Article> selectAllByBordId(Long border);
    Article selectDetailById( Long id);
    Article selectById(Long id);

    void modify(Long id, String title,String content);
    void thumbsUp(Long id);
    @Transactional
    void delete(Long id);
    /**
     * 文章回复数量 +1
     * @param id 版块Id
     */
    void addOneReplyCountById (Long id);
    /**
     * 根据 userId 获得文章,板块信息
     * @param userId
     * @return
     */
    List<Article> selectByUserId(Long userId);
}
